1. Technical Field
The present invention relates to an image processor that detects targets such as a human and a pet from an image, an image processing method, a control program, and a recording medium.
2. Related Art
In recent years, a technology in which, during photographing, a human face and the like are detected to focus a digital camera on a detected target or to adjust a white balance of the detected target is provided on image processors, such as the digital camera. In the technology, it is desired that targets such as the human face can correctly be detected from the image. Therefore, various technologies of detecting a predetermined target have been developed.
For example, in a technology disclosed in Japanese Unexamined Patent Publication No. 2005-100121, sample data is analyzed to determine a kind and a determination condition of a feature quantity used in determination processing of determining whether target data is data having a specific content according to a desired balance between a determination accuracy and a computational load in the determination processing.
In a technology disclosed in Japanese Unexamined Patent Publication No. 2008-204103, based on teaching data, a combination of currently-used recognizers is adaptively updated in accordance with environment.
In a technology disclosed in Japanese Unexamined Patent Publication No. 2011-124819, a face pattern having a high matching degree with a registration pet image is extracted by referring to dictionary data, and processing of recognizing the registration pet image is performed based on the extracted face pattern.
At this point, in the conventional image processor, face detection processing is performed by a face detector that is a general-purpose detector for detecting a human face and a pet face and the like. In many cases, the face detector can detect the human face and the pet face, which are included in the photographed image. However, sometimes the face detector cannot detect some of the human faces and the pet faces. The user is caused to register the image including the target that cannot be detected by the general-purpose detector, and the desired target is detected based on the registered image, thereby solving the problem.
For example, it is assumed that the human and shiba-inu that is the pet are taken in the image, and that the face of the shiba-inu cannot be detected by the face detector that is the general-purpose detector. It is assumed that, in addition to the general-purpose detector, the image processor includes dedicated detectors, such as a shiba-inu classifier, a chihuahua classifier, and a dachshund classifier, which detect the target that is a subdivision of the detection target of the general-purpose detector.
At this point, the image processor performs the detection processing to the registered image using the dedicated detector, and sets the dedicated detector having the best detection result to the classifier that detects the target included in the registered image. Therefore, the target that cannot be detected by the general-purpose detector can be detected by performing the detection processing using the set classifier.
Usually a user registers only the target that cannot be detected by the general-purpose detector. Therefore, in the above example, the image processor performs the detection processing to the photograph in which the human and the shiba-inu are taken using both the general-purpose classifier and the classifier that detects the shiba-inu. Thus, the target that is not detected can be detected by registering the target. However, the number of classifiers that perform the detection processing increases with increasing number of registration targets. Therefore, unfortunately a processing load or a processing time increases in the conventional image processor.
The present invention has been devised to solve the problems described above, and an object thereof is to construct an image processor, an image processing method, a control program, and a recording medium, which reduce the processing amount or the processing time in the processing of detecting the target included in the registered image from a certain image.